﻿@using Whoever.Framework.Enum;

@model EditorialProyectos.Website.Models.LoginViewModel

<div data-bind="with: viewModel.Login">
    @using (Html.BeginForm("Login", "Account", FormMethod.Post, new { id = "login", @data_bind = "submit: viewModel.AttemptLogin" }))
    {
        @Html.AntiForgeryToken()
        <div class="form-group">
            @Html.LocalizedLabelFor(Model => Model.Email)
            @Html.KOLocalizedHelpFor(Model => Model.Email, MessageType.Warning, "FailedSubmit")
            @Html.KOTextBoxFor(Model => Model.Email)
        </div>
        <div class="form-group">
            @Html.LocalizedLabelFor(Model => Model.Password)
            @Html.KOLocalizedHelpFor(Model => Model.Password, MessageType.Warning, "FailedSubmit")
            @Html.KOTextBoxFor(Model => Model.Password)
        </div>
        <button data-bind="click: viewModel.AttemptLogin" type="submit" class="btn btn-action btn-full-width">@Html.LocalizedAction("Login")</button> 
    }
</div>
